<template>
  <div class="banner">
    <div class="head">
      <div class="logo">
        <img src="../../assets/shenzhong.png" alt="" srcset="">
      </div>
      <div class="menu">
        <p :class="route.path=='/'?'active':''" @click="handHome">首页</p>
        <p @click="handBim">BIM学院</p>
        <p :class="route.path=='/consult'?'active':''" @click="handConsult">BIM咨询</p>
        <p :class="route.path=='/research'?'active':''" @click="handResearch">数智研发</p>
        <p :class="route.path=='/animation'?'active':''" @click="handAnimation">工程动画</p>
        <p :class="route.path=='/contact'?'active':''" @click="handContact">联系我们</p>
      </div>
      <div class="contact">
        <img src="../../assets/phone2.png" alt="">
        <!-- <span>0551-62620240</span> -->
      </div>
    </div>
    <div class="title">
      <p>申众工程科技 助力BIM落地</p>
    </div>
  </div>
</template>


<script>
import { useRoute,useRouter } from 'vue-router'

export default {
  name: 'BannerVue',
  setup () {
    const router = useRouter()
    const route = useRoute()

    const handHome = ()=>{
      router.push('/')
    }
    const handBim = ()=>{
      window.location.href = 'http://bim.shen-zhong.cn/';
    }
    const handConsult = ()=>{
      router.push('/consult')
    }
    const handResearch = ()=>{
      router.push('/research')
    }
    const handAnimation = ()=>{
      router.push('/animation')
    }
    const handContact = ()=>{
      router.push('/contact')
    }
    return {
      route,
      handHome,
      handBim,
      handConsult,
      handResearch,
      handAnimation,
      handContact
    }
  }
}
</script>

<style lang="scss" scoped>
.active{
  font-weight: 700;
  color: rgba(0, 96, 255, 1);
}
.banner{
  position: relative;
  width: 98.5vw;
  margin: 0 auto;
  height: 7.5rem;
  padding-top: .25rem;
  background-image: url(https://asetdisk.oss-cn-beijing.aliyuncs.com/aset/main/bg2.f6471143.jpg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  .head{
    display: flex;
    font-family: '思源黑体';
    justify-content: space-around;
    .logo{
      img{
        width: 2.25rem;
        height: .5rem; 
        display: block;
      }
    }
    .menu{
      display: flex;
      align-items: center;
      p{
        margin: 0 .375rem;
        // font-size: 14px;
        cursor: pointer;
  
      }
      p:hover{
        color: rgba(0, 96, 255, 1);
      }
    }
    .contact{
      display: flex;
      cursor: pointer;
      align-items: center;
      img{
        width: 2.5rem;
        // height: .25rem;
        margin: 0 .125rem;
      }
    }
  }
  .title{
    margin-top: 10%;
    color: aliceblue;
    text-align: left;
    line-height: 10vh;
    font-weight: 700;
    font-family: '思源黑体';
    p{
      font-size: .65rem;
      text-align: center;
    }
  }
}
</style>